/*
 * TsMediaCaster.h
 *
 *  Created on: 2016年8月24日
 *      Author: zhengboyuan
 */

#ifndef TSMEDIACASTER_H_
#define TSMEDIACASTER_H_

#include "MediaStream.h"

namespace av
{


class TsMediaCaster
{
public:
	virtual ~TsMediaCaster() {}

	virtual int open(const std::string& ip, uint16_t port, const MediaFormat& fmt) =0;

	virtual void close() =0;

	virtual bool isOpen() =0;

	virtual void setID(int id) =0;

	virtual int getID() =0;

	virtual bool addTarget(const std::string& ip, uint16_t port) =0;

	virtual void removeTarget(const std::string& ip, uint16_t port) =0;

	virtual size_t getTargetCount() =0;

	virtual void removeAllTarget() =0;

	virtual bool write(int type, uint8_t* data, int size, int64_t pts, int duration, int flags) =0;


};



} /* namespace av */

#endif /* TSMEDIACASTER_H_ */
